<template>
    <div style="padding:20px 20px 20px 20px;background:#fff;">
      <el-table :data="list.slice((currentPage-1)*pagesize,currentPage*pagesize)" style="width: 100%"
      id="exportTable">
        <el-table-column prop="username" label="员工姓名" align="center"></el-table-column>
        <el-table-column prop="sum" label="总业绩" align="center"></el-table-column>
        <el-table-column prop="pay" label="已付款" align="center"></el-table-column>
        <el-table-column prop="payNo" label="未付款" align="center"></el-table-column>
        <el-table-column prop="take" label="已送货" align="center"></el-table-column>
        <el-table-column prop="takeNo" label="未送货" align="center"></el-table-column>
      </el-table>
      <el-pagination
        class="fen"
        background
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-size="pagesize"
        :page-sizes="[5, 10, 20, 50]"      
        layout="total, sizes, prev, pager, next, jumper"
        :total="list.length">
      </el-pagination>
</div>
</template>
<script>
export default {
  name: 'result',
  props:['list'],
  data(){
      return {
          currentPage:1, //初始页
          pagesize:10, //每页的数据
          show_page:true,
          nowpage:1,
          maxpage:10,
          imgUrl:this.url
      }
  },
  created: function() {
    
  },
  methods: {
    handleSizeChange: function (size) {
        this.pagesize = size;
    },
    handleCurrentChange: function(currentPage){
      this.currentPage = currentPage;
    },
    changeLeft($event){
        $event.currentTarget.className="active";
    },
    removeLeft($event){
        $event.currentTarget.className ="tdclass";
    },
    load(tree, treeNode, resolve) {
      setTimeout(() => {
        resolve()
      }, 1000)
    }
  }
};
</script>
<style>
.fen{text-align:center;}
  .demo-table-expand {
    font-size: 0;
  }
  .demo-table-expand label {
    width: 90px;
    color: #99a9bf;
  }
  .demo-table-expand .el-form-item {
    margin-right: 0;
    margin-bottom: 0;
    width: 50%;
  }
</style>